package ruleengine;

import java.util.ArrayList;
import java.util.List;

import rulebase.RemainingYear;
import rulebase.SalaryMatch;
import rulebase.SalaryMatchBaseYearCompensation;
import commondata.ITradeRule;
import commondata.TradeOptionStruct;

public class RuleEngineManager implements ITradeRule {

	private List<ITradeRule> tradeRules = new ArrayList<ITradeRule>();

	public RuleEngineManager() {

		tradeRules.add(new SalaryMatch());
		tradeRules.add(new SalaryMatchBaseYearCompensation());
		tradeRules.add(new RemainingYear());
	}

	public void isTradeApplicable(TradeOptionStruct tradeOptionStruct) {

		for (ITradeRule rule : tradeRules) {
			rule.isTradeApplicable(tradeOptionStruct);
		}
	}

}
